import { NavBar } from 'antd-mobile'
import React from 'react'
import { useLocation, useNavigate } from 'react-router-dom'
const Deail = () => {
    const navigate = useNavigate()

    const back = () => {
        navigate(-1)
    }
    const { state } = useLocation()
    console.log(state);

    return (
        <div>

            <NavBar onBack={back}>详情</NavBar>
            <div>
                <img src={state.images} alt='' style={{ width: "100%", height: "200px" }} />
                <span>{state.title}</span>
                <span>{state.price}</span>
                <span>{state.date}</span>
            </div>
        </div>
    )
}

export default Deail
